package cn.study.vue_project_xxx.util;

/**
 * @Author：pengxu
 * @Date：2023/3/13 9:39
 */

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

/**
 * @author ViRgO Ch3n
 * @version v1.0
 * @description 分页基本包
 * @date 2019年5月10日
 */
public class PageParam<T> {

    @ApiModelProperty(value = "分页-当前页数", required = true)
    private long pageNo = 1;
    @ApiModelProperty(value = "分页-每页的数量", required = true)
    private long pageSize = 10;

    @ApiModelProperty(value = "分页-多字段排序")
    private List<OrderBy> orderBys;

    @ApiModelProperty(value = "分页-单字段排序")
    private Boolean asc;


    @Data
    public static class OrderBy {
        @ApiModelProperty(value = "排序key")
        private String key;
        @ApiModelProperty(value = "分页-当前页数", required = true)
        private Boolean asc;

    }

    public long getPageNo() {
        return pageNo;
    }

    public void setPageNo(long pageNo) {
        this.pageNo = pageNo;
    }

    public long getPageSize() {
        return pageSize;
    }

    public void setPageSize(long pageSize) {
        this.pageSize = pageSize;
    }

    public List<OrderBy> getOrderBys() {
        return orderBys;
    }

    public void setOrderBys(List<OrderBy> orderBys) {
        this.orderBys = orderBys;
    }

    public Boolean getAsc() {
        return asc;
    }

    public void setAsc(Boolean asc) {
        this.asc = asc;
    }
}
